<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			.red{
				background-color: aqua;
				color: red;
				font-size: 20px;
			}
		</style>
	</head>
	<body>
		<div id="app">
			<!-- v-bind:控制对象的class属性 -->
			<!-- 
			 语法样式：
				v-bind:class="{class的属性名:是否展示}"
			 
			 -->
			<a v-bind:class="{red:isshow}">aaaaaaaa</a>
			
			<button type="button" v-on:click="fun1()">切换样式</button>
		</div>
		
		<script src="../js/vuejs-2.5.16.js" type="text/javascript" charset="utf-8"></script>
		
		<script type="text/javascript">
			const vue = new Vue({
				el: "#app",
				data: {
					isshow: true
				},
				methods: {
					// 切换演示
					fun1:function(){
						this.isshow = !this.isshow
					}
				}
			})
		</script>
	</body>
</html>
